Skip to content

fix: improve POD accuracy and add explicit -s guard#101

Draft
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/docs-and-guard-consistency
Draft

fix: improve POD accuracy and add explicit -s guard#101
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/docs-and-guard-consistency

Conversation

@Koan-Bot
Copy link
Copy Markdown
Contributor

@Koan-Bot Koan-Bot commented May 1, 2026

What

Fixes several documentation inaccuracies in the POD and adds an explicit
guard to the -s handler for consistency with sibling handlers.

Why

  • CHECK_IS_NULL is exported and essential for signaling "file not found"
    from mock callbacks, but was missing from the documented helper list —
    users had to discover it from source or tests.
  • The -s / -M / -C / -A description said "integers" but -M/-C/-A
    return fractional days (NV), not integers.
  • stat_as_* accept bare keys (uid, size) via normalization, but the
    docs only listed st_* forms — users writing { size => 42 } had no
    confirmation it was supported.
  • Two internal POD links were broken (extra space, missing "and lstat").
  • The "very early development stage" notice was outdated for v0.015.
  • The -s handler in _check_from_stat was the only handler without an
    explicit @stat guard, relying on accidental undef propagation.

How

Single-file change in lib/Overload/FileCheck.pm — POD sections updated,
one line added to the -s dispatch handler.

Testing

make test — all tests pass. podchecker clean (was showing 2 errors before fix).

🤖 Generated with Claude Code


Quality Report

Changes: 1 file changed, 14 insertions(+), 8 deletions(-)

Code scan: clean

Tests: passed (0 Tests)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

- Document CHECK_IS_NULL in the "Check helpers" section (was exported
  but undocumented, leaving users unaware of how to signal "file not found")
- Fix NV op description: -M/-C/-A return fractional days, not integers
- Document that stat hash keys accept bare forms (uid, size) in addition
  to st_* prefixed forms, and that unknown keys are rejected
- Update outdated "very early development stage" notice
- Fix two broken internal POD links (/"Mocking stat", /" Mocking all...")
- Add explicit CHECK_IS_NULL guard to -s handler in _check_from_stat for
  consistency with -e, -M, -C, -A, -T, -B handlers (behavior was already
  correct via accidental undef propagation through _check)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant